package com.woniu.user;

import ch.qos.logback.classic.pattern.MessageConverter;
import com.woniu.common.util.SnowflakeIdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableDiscoveryClient
@ComponentScan("com.woniu")
@MapperScan("com.woniu.user.mapper")
@EnableTransactionManagement
@EnableCaching
public class UserApplication {
    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class,args);
    }

    @Bean
    public SnowflakeIdWorker initSnowflakeIdWorker(){
        return new SnowflakeIdWorker(1,1,1);
    }

}
